#include <Windows.h>

class CWnd
{
public:
	bool  CreateEx(DWORD dwExStyle,
		LPCTSTR lpClassName,
		LPCTSTR lpWindowName,
		DWORD dwStyle,
		int x,
		int y,
		int nWidth,
		int nHeight,
		HWND hWndParent,
		HMENU hMenu,
		HINSTANCE hInstance,
		LPVOID lpParam
	);
	bool ShowWindow(int nCmdShow);
	bool  UpdateWindow();

public:
	HWND n_hwnd;
};

bool CWnd::CreateEx(DWORD dwExStyle,
	LPCTSTR lpClassName,
	LPCTSTR lpWindowName,
	DWORD dwStyle,
	int x,
	int y,
	int nWidth,
	int nHeight,
	HWND hWndParent,
	HMENU hMenu,
	HINSTANCE hInstance,
	LPVOID lpParam)
{
	this->n_hwnd = CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwExStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
	if (this->n_hwnd != nullptr) {
		return true;
	}
	else
	{
		return false;
	}
}

bool CWnd::ShowWindow(int  nCmdShow) {
	return ::ShowWindow(this->n_hwnd, nCmdShow);
}

bool CWnd::UpdateWindow() {
	return ::UpdateWindow(this->n_hwnd);
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
	LPWSTR lpCmdLine, int nShowCmd) {
	WNDCLASS wndcls;
	wndcls.cbClsExtra = 0;
	wndcls.cbWndExtra = 0;


	RegisterClass(&wndcls);

	CWnd wnd;
	wnd.CreateEx();
	wnd.ShowWindow(SW_SHOWNORMAL);
	wnd.UpdateWindow();


}